package com.zhang.chatcenter.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.zhang.chatcenter.common.model.dao.RoomDO;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * <p>
 * Mapper 接口
 * </p>
 *
 * @author zhangfanjun
 * @since 2023-12-20
 */
public interface RoomMapper extends BaseMapper<RoomDO> {

    /**
     * 查找用户的聊天室
     *
     * @param userId 用户id
     * @param groupChat
     * @return 聊天室信息
     * @author zfj
     * @date 2024/3/19
     */
    List<RoomDO> getMyChat(@Param("userId") Long userId,@Param("groupChat") Boolean groupChat);

    /**
    * @Description:
    * @Param:
    * @return:
    * @Author: zhangFanJun
    * @Date: 2024/3/19
    */
    RoomDO getRoom(@Param("userId1")Long userId1, @Param("userId2") Long userId2);
}
